Resolving view name in Request Vars panel. #214
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've found it very helpful to resolve named views in Request Vars panel. That way I can use 'reverse' with the given name in my source code without looking in urls.py.
This patch removes 'process_view' method from request vars panel. This in turn breaks my 2 old tests. In that case I've removed them and wrote 4 tests for request vars panel instead. They basically cover all the view information in request vars panel.
The code and tests run differently on Django prior to 1.3 and Django >= 1.3 (see https://docs.djangoproject.com/en/dev/topics/http/urls/#resolve). In the formem case the URL name is not resolved and
<unavailable>
is returned instead.